package com.dzqc.fly.service.impl;

import com.dzqc.fly.db.dao.TbUserDao;
import com.dzqc.fly.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Set;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private TbUserDao userDao;

    @Override
    public Integer login(HashMap param) {
        Integer userid = userDao.login(param);
        return userid;
    }

    @Override
    public Set<String> searchUserRole(int userId) {
        Set<String> permissions = userDao.searchUserRole(userId);
        return permissions;
    }

    @Override
    public int updatePassword(HashMap param) {
        int i = userDao.updatePassword(param);
        return i;
    }

    @Override
    public int updateclassoffdy(HashMap param) {
        int i = userDao.updateclassoffdy(param);
        return i;

    }

    @Override
    public int updateClass(HashMap param) {
        int i = userDao.updateClass(param);
        return i;
    }

    @Override
    public HashMap searchUserInfo(int userId) {
        HashMap hashMap = userDao.searchUserInfo(userId);
        return hashMap;
    }
}
